home *** CD-ROM | disk | FTP | other *** search
- on startMovie
- global i, j, k, n, o, volume, PLAYRATE
- set i to 0
- set PLAYRATE to 1.0
- set the exitLock to 1
- SETSPEAKER()
- if the machineType = 256 then
- nothing()
- else
- openXLib("BLENDER1:FILES:RW.XOj")
- nothing()
- end if
- end
-
- on initRearWindow theColor
- global rwObj
- if the machineType = 256 then
- nothing()
- else
- if objectp(rwObj) then
- rwObj(mdispose)
- end if
- set rwObj to RearWindow(mnew, "M")
- rwObj(mIndexColorToWindow, theColor)
- end if
- end
-
- on disposeRearWindow
- global rwObj
- if the machineType = 256 then
- nothing()
- else
- if objectp(rwObj) then
- rwObj(mdispose)
- end if
- end if
- end
-
- on enterFrame
- global i, j, k
- set i to i + 1
- set j to i mod 4
- set k to i mod 2
- set the castNum of sprite 33 to the number of cast (453 + j)
- set the castNum of sprite 34 to the number of cast (421 + k)
- puppetSprite(35, 1)
- set the castNum of sprite 36 to the number of cast (425 + k)
- set the castNum of sprite 37 to the number of cast (401 + j)
- set the castNum of sprite 38 to the number of cast (409 + j)
- set the castNum of sprite 39 to the number of cast (405 + j)
- set the castNum of sprite 40 to the number of cast (413 + j)
- set the castNum of sprite 41 to the number of cast (427 + k)
- set the castNum of sprite 42 to the number of cast (427 + k)
- set the castNum of sprite 43 to the number of cast (427 + k)
- if the castNum of sprite 44 = 427 then
- set the castNum of sprite 44 to the number of cast 429
- else
- set the castNum of sprite 44 to the number of cast 427
- end if
- set the castNum of sprite 45 to the number of cast (431 + k)
- updateStage()
- if (the timeoutLapsed / 60) > 720 then
- beginCONTROL()
- end if
- set the keyDownScript to "checkKey"
- end
-
- on SPEAK
- set the movieRate of sprite 31 to 1.0
- end
-
- on checkKey
- set exit to 0
- if the commandDown and (the key = "q") then
- set exit to 1
- endMOVIE()
- end if
- if the commandDown and (the key = ".") then
- set exit to 1
- endMOVIE()
- end if
- if (exit = 0) and not objectp(CONTROLWINDOW) then
- wrongKEY()
- end if
- end
-
- on beginCONTROL
- global CONTROLWINDOW
- set the timeoutLapsed to 0
- if objectp(CONTROLWINDOW) then
- forget(CONTROLWINDOW)
- end if
- set horzOrigin to the stageLeft + 240
- set vertOrigin to the stageTop + 160
- set CONTROLWINDOWrect to rect(horzOrigin, vertOrigin, horzOrigin + 240, vertOrigin + 160)
- set CONTROLWINDOW to window "CONTROL"
- set the rect of CONTROLWINDOW to CONTROLWINDOWrect
- set the fileName of CONTROLWINDOW to "CONTROL.DIR"
- set the titleVisible of CONTROLWINDOW to 0
- set the modal of window "CONTROL.DIR" to 1
- open(CONTROLWINDOW)
- end
-
- on beginOPEN
- nothing()
- end
-
- on endMOVIE
- global CONTROLWINDOW
- if objectp(CONTROLWINDOW) then
- forget(CONTROLWINDOW)
- end if
- set horzOrigin to the stageLeft + 200
- set vertOrigin to the stageTop + 150
- set CONTROLWINDOWrect to rect(horzOrigin, vertOrigin, horzOrigin + 240, vertOrigin + 160)
- set CONTROLWINDOW to window "CONTROL"
- set the rect of CONTROLWINDOW to CONTROLWINDOWrect
- set the fileName of CONTROLWINDOW to "endWIND.DIR"
- set the titleVisible of CONTROLWINDOW to 0
- set the modal of window "endWIND.DIR" to 1
- open(CONTROLWINDOW)
- end
-
- on wrongKEY
- global CONTROLWINDOW
- if objectp(CONTROLWINDOW) then
- forget(CONTROLWINDOW)
- end if
- set horzOrigin to the stageLeft + 240
- set vertOrigin to the stageTop + 160
- set CONTROLWINDOWrect to rect(horzOrigin, vertOrigin, horzOrigin + 240, vertOrigin + 160)
- set CONTROLWINDOW to window "CONTROL"
- set the rect of CONTROLWINDOW to CONTROLWINDOWrect
- set the fileName of CONTROLWINDOW to "wrongKEY.DIR"
- set the titleVisible of CONTROLWINDOW to 0
- set the modal of window "wrongKEY.DIR" to 1
- open(CONTROLWINDOW)
- end
-
- on stopMovie
- finishMovie()
- end
-
- on finishMovie
- global CONTROLWINDOW
- set the modal of window "CONTROL.DIR" to 0
- set the modal of window "wrongKEY.DIR" to 0
- set the modal of window "endWIND.DIR" to 0
- if objectp(CONTROLWINDOW) then
- forget(CONTROLWINDOW)
- end if
- end
-
- on SETSPEAKER
- global volume
- if volume = 0 then
- puppetSprite(35, 1)
- set the castNum of sprite 35 to 417
- set the soundLevel to 0
- updateStage()
- end if
- if volume = 1 then
- puppetSprite(35, 1)
- set the castNum of sprite 35 to 418
- set the soundLevel to 2
- updateStage()
- end if
- if volume = 2 then
- puppetSprite(35, 1)
- set the castNum of sprite 35 to 419
- set the soundLevel to 5
- updateStage()
- end if
- if volume = 3 then
- puppetSprite(35, 1)
- set the castNum of sprite 35 to 420
- set the soundLevel to 7
- updateStage()
- end if
- end
-